<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Livox SDK API: sdk_core/include/third_party/spdlog/spdlog/sinks/android_sink.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="1.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Livox SDK API
   &#160;<span id="projectnumber">V2.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('android__sink_8h_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">android_sink.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="android__sink_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">// Copyright(c) 2015 Gabi Melman.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">// Distributed under the MIT License (http://opensource.org/licenses/MIT)</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160; </div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160; </div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#ifndef SPDLOG_H</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="spdlog_8h.html">spdlog/spdlog.h</a>&quot;</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160; </div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="fmt__helper_8h.html">spdlog/details/fmt_helper.h</a>&quot;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="null__mutex_8h.html">spdlog/details/null_mutex.h</a>&quot;</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="os_8h.html">spdlog/details/os.h</a>&quot;</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="base__sink_8h.html">spdlog/sinks/base_sink.h</a>&quot;</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160; </div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &lt;android/log.h&gt;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &lt;chrono&gt;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &lt;mutex&gt;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#include &lt;thread&gt;</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#if !defined(SPDLOG_ANDROID_RETRIES)</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="android__sink_8h.html#a8e65ae8a75f7a37ede8942a4311cee5e">   24</a></span>&#160;<span class="preprocessor">#define SPDLOG_ANDROID_RETRIES 2</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160; </div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacespdlog.html">spdlog</a> {</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="keyword">namespace </span>sinks {</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment"> * Android sink (logging using __android_log_write)</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> Mutex&gt;</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="classspdlog_1_1sinks_1_1android__sink.html">   34</a></span>&#160;<span class="keyword">class </span><a class="code" href="classspdlog_1_1sinks_1_1android__sink.html">android_sink</a> final : <span class="keyword">public</span> <a class="code" href="classspdlog_1_1sinks_1_1base__sink.html">base_sink</a>&lt;Mutex&gt;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;{</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="classspdlog_1_1sinks_1_1android__sink.html#afc2727bf62737809cd3f2105e5637540">   37</a></span>&#160;    <span class="keyword">explicit</span> <a class="code" href="classspdlog_1_1sinks_1_1android__sink.html#afc2727bf62737809cd3f2105e5637540">android_sink</a>(std::string tag = <span class="stringliteral">&quot;spdlog&quot;</span>, <span class="keywordtype">bool</span> use_raw_msg = <span class="keyword">false</span>)</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        : tag_(<a class="code" href="namespacestd.html">std</a>::move(tag))</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        , use_raw_msg_(use_raw_msg)</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    {</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    }</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classspdlog_1_1sinks_1_1android__sink.html#ab91c7aabd013d009ff811e6d34324128">   44</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classspdlog_1_1sinks_1_1android__sink.html#ab91c7aabd013d009ff811e6d34324128">sink_it_</a>(<span class="keyword">const</span> <a class="code" href="structspdlog_1_1details_1_1log__msg.html">details::log_msg</a> &amp;msg)<span class="keyword"> override</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <span class="keyword">const</span> android_LogPriority priority = convert_to_android_(msg.<a class="code" href="structspdlog_1_1details_1_1log__msg.html#a4142f4d66140a1ea24053311ebea5706">level</a>);</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        <a class="code" href="classfmt_1_1v5_1_1basic__memory__buffer.html">fmt::memory_buffer</a> formatted;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;        <span class="keywordflow">if</span> (use_raw_msg_)</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        {</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;            <a class="code" href="namespacespdlog_1_1details_1_1fmt__helper.html#a603f4d0d8853a61610a0042d5d62fe94">details::fmt_helper::append_string_view</a>(msg.<a class="code" href="structspdlog_1_1details_1_1log__msg.html#a33fd07702d73245581fccd8d0d04b82a">payload</a>, formatted);</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        }</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        {</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;            <a class="code" href="classspdlog_1_1sinks_1_1sink.html#aa0d19f09363a11b63b4a9b1d46f8a4b3">sink::formatter_</a>-&gt;format(msg, formatted);</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        }</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        formatted.<a class="code" href="classfmt_1_1v5_1_1internal_1_1basic__buffer.html#a8e3b65c01dadb977b9c2327864db9e15">push_back</a>(<span class="charliteral">&#39;\0&#39;</span>);</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">char</span> *msg_output = formatted.<a class="code" href="classfmt_1_1v5_1_1internal_1_1basic__buffer.html#a384f1304da6ce18c4713368327354479">data</a>();</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160; </div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <span class="comment">// See system/core/liblog/logger_write.c for explanation of return value</span></div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        <span class="keywordtype">int</span> ret = __android_log_write(priority, tag_.c_str(), msg_output);</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <span class="keywordtype">int</span> retry_count = 0;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        <span class="keywordflow">while</span> ((ret == -11 <span class="comment">/*EAGAIN*/</span>) &amp;&amp; (retry_count &lt; <a class="code" href="android__sink_8h.html#a8e65ae8a75f7a37ede8942a4311cee5e">SPDLOG_ANDROID_RETRIES</a>))</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        {</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;            <a class="code" href="namespacespdlog_1_1details_1_1os.html#a56a474fcf965264674346ffdefac0759">details::os::sleep_for_millis</a>(5);</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;            ret = __android_log_write(priority, tag_.c_str(), msg_output);</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;            retry_count++;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        }</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160; </div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        <span class="keywordflow">if</span> (ret &lt; 0)</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        {</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;            <span class="keywordflow">throw</span> <a class="code" href="classspdlog_1_1spdlog__ex.html">spdlog_ex</a>(<span class="stringliteral">&quot;__android_log_write() failed&quot;</span>, ret);</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        }</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    }</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160; </div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="classspdlog_1_1sinks_1_1android__sink.html#ac71785899fb01c7b0328b66b3727e2c3">   75</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classspdlog_1_1sinks_1_1android__sink.html#ac71785899fb01c7b0328b66b3727e2c3">flush_</a>()<span class="keyword"> override </span>{}</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160; </div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    <span class="keyword">static</span> android_LogPriority convert_to_android_(<a class="code" href="namespacespdlog_1_1level.html#a35f5227e5daf228d28a207b7b2aefc8b">spdlog::level::level_enum</a> <a class="code" href="classspdlog_1_1sinks_1_1sink.html#ae59ca2b418c5cdfed1c04e49a444be1c">level</a>)</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    {</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        <span class="keywordflow">switch</span> (<a class="code" href="classspdlog_1_1sinks_1_1sink.html#ae59ca2b418c5cdfed1c04e49a444be1c">level</a>)</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        {</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacespdlog_1_1level.html#a35f5227e5daf228d28a207b7b2aefc8badd5891a1416461ee9e7d7e19d41af51f">spdlog::level::trace</a>:</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;            <span class="keywordflow">return</span> ANDROID_LOG_VERBOSE;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacespdlog_1_1level.html#a35f5227e5daf228d28a207b7b2aefc8baea632f71a316dac4dbaf2d98534c7ca5">spdlog::level::debug</a>:</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;            <span class="keywordflow">return</span> ANDROID_LOG_DEBUG;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacespdlog_1_1level.html#a35f5227e5daf228d28a207b7b2aefc8ba7f09db55ad64d87e4124f10582cb016f">spdlog::level::info</a>:</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;            <span class="keywordflow">return</span> ANDROID_LOG_INFO;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacespdlog_1_1level.html#a35f5227e5daf228d28a207b7b2aefc8ba6c371ca09668dd308a1997eab47def05">spdlog::level::warn</a>:</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;            <span class="keywordflow">return</span> ANDROID_LOG_WARN;</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacespdlog_1_1level.html#a35f5227e5daf228d28a207b7b2aefc8ba4d723e295b98a75c1263d85fc165045f">spdlog::level::err</a>:</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;            <span class="keywordflow">return</span> ANDROID_LOG_ERROR;</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacespdlog_1_1level.html#a35f5227e5daf228d28a207b7b2aefc8ba309b214a2b8629b6cf0048ce916e8a58">spdlog::level::critical</a>:</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;            <span class="keywordflow">return</span> ANDROID_LOG_FATAL;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;            <span class="keywordflow">return</span> ANDROID_LOG_DEFAULT;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        }</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    }</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160; </div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    std::string tag_;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keywordtype">bool</span> use_raw_msg_;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;};</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160; </div>
<div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="namespacespdlog_1_1sinks.html#afa3ee88e3e87a4908cd80f8ccd4fdd3e">  103</a></span>&#160;<span class="keyword">using</span> <a class="code" href="classspdlog_1_1sinks_1_1android__sink.html">android_sink_mt</a> = <a class="code" href="classspdlog_1_1sinks_1_1android__sink.html">android_sink&lt;std::mutex&gt;</a>;</div>
<div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="namespacespdlog_1_1sinks.html#a38acf93862031f1db0e4bdcf8e8b18f3">  104</a></span>&#160;<span class="keyword">using</span> <a class="code" href="classspdlog_1_1sinks_1_1android__sink.html">android_sink_st</a> = <a class="code" href="classspdlog_1_1sinks_1_1android__sink.html">android_sink&lt;details::null_mutex&gt;</a>;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;} <span class="comment">// namespace sinks</span></div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160; </div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;<span class="comment">// Create and register android syslog logger</span></div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160; </div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> Factory = default_factory&gt;</div>
<div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="namespacespdlog.html#a0811adb1075181f73abc87c624fbff7e">  110</a></span>&#160;<span class="keyword">inline</span> std::shared_ptr&lt;logger&gt; <a class="code" href="namespacespdlog.html#a0811adb1075181f73abc87c624fbff7e">android_logger_mt</a>(<span class="keyword">const</span> std::string &amp;logger_name, <span class="keyword">const</span> std::string &amp;tag = <span class="stringliteral">&quot;spdlog&quot;</span>)</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;{</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <span class="keywordflow">return</span> Factory::template create&lt;sinks::android_sink_mt&gt;(logger_name, tag);</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;}</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160; </div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> Factory = default_factory&gt;</div>
<div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="namespacespdlog.html#aab5b508d51de238919a570cf3ca6d3db">  116</a></span>&#160;<span class="keyword">inline</span> std::shared_ptr&lt;logger&gt; <a class="code" href="namespacespdlog.html#aab5b508d51de238919a570cf3ca6d3db">android_logger_st</a>(<span class="keyword">const</span> std::string &amp;logger_name, <span class="keyword">const</span> std::string &amp;tag = <span class="stringliteral">&quot;spdlog&quot;</span>)</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;{</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    <span class="keywordflow">return</span> Factory::template create&lt;sinks::android_sink_st&gt;(logger_name, tag);</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;}</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160; </div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;} <span class="comment">// namespace spdlog</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="anamespacespdlog_1_1level_html_a35f5227e5daf228d28a207b7b2aefc8b"><div class="ttname"><a href="namespacespdlog_1_1level.html#a35f5227e5daf228d28a207b7b2aefc8b">spdlog::level::level_enum</a></div><div class="ttdeci">level_enum</div><div class="ttdef"><b>Definition:</b> <a href="common_8h_source.html#l00111">common.h:111</a></div></div>
<div class="ttc" id="aos_8h_html"><div class="ttname"><a href="os_8h.html">os.h</a></div></div>
<div class="ttc" id="aclassfmt_1_1v5_1_1basic__memory__buffer_html"><div class="ttname"><a href="classfmt_1_1v5_1_1basic__memory__buffer.html">fmt::v5::basic_memory_buffer</a></div><div class="ttdef"><b>Definition:</b> <a href="format_8h_source.html#l00464">format.h:464</a></div></div>
<div class="ttc" id="anamespacespdlog_1_1level_html_a35f5227e5daf228d28a207b7b2aefc8ba7f09db55ad64d87e4124f10582cb016f"><div class="ttname"><a href="namespacespdlog_1_1level.html#a35f5227e5daf228d28a207b7b2aefc8ba7f09db55ad64d87e4124f10582cb016f">spdlog::level::info</a></div><div class="ttdef"><b>Definition:</b> <a href="common_8h_source.html#l00115">common.h:115</a></div></div>
<div class="ttc" id="aclassspdlog_1_1sinks_1_1sink_html_aa0d19f09363a11b63b4a9b1d46f8a4b3"><div class="ttname"><a href="classspdlog_1_1sinks_1_1sink.html#aa0d19f09363a11b63b4a9b1d46f8a4b3">spdlog::sinks::sink::formatter_</a></div><div class="ttdeci">std::unique_ptr&lt; spdlog::formatter &gt; formatter_</div><div class="ttdef"><b>Definition:</b> <a href="sink_8h_source.html#l00050">sink.h:50</a></div></div>
<div class="ttc" id="anamespacespdlog_1_1details_1_1os_html_a56a474fcf965264674346ffdefac0759"><div class="ttname"><a href="namespacespdlog_1_1details_1_1os.html#a56a474fcf965264674346ffdefac0759">spdlog::details::os::sleep_for_millis</a></div><div class="ttdeci">void sleep_for_millis(int milliseconds) noexcept</div><div class="ttdef"><b>Definition:</b> <a href="os_8h_source.html#l00351">os.h:351</a></div></div>
<div class="ttc" id="abase__sink_8h_html"><div class="ttname"><a href="base__sink_8h.html">base_sink.h</a></div></div>
<div class="ttc" id="anamespacespdlog_1_1details_1_1fmt__helper_html_a603f4d0d8853a61610a0042d5d62fe94"><div class="ttname"><a href="namespacespdlog_1_1details_1_1fmt__helper.html#a603f4d0d8853a61610a0042d5d62fe94">spdlog::details::fmt_helper::append_string_view</a></div><div class="ttdeci">void append_string_view(spdlog::string_view_t view, fmt::basic_memory_buffer&lt; char, Buffer_Size &gt; &amp;dest)</div><div class="ttdef"><b>Definition:</b> <a href="fmt__helper_8h_source.html#l00030">fmt_helper.h:30</a></div></div>
<div class="ttc" id="anamespacespdlog_1_1level_html_a35f5227e5daf228d28a207b7b2aefc8baea632f71a316dac4dbaf2d98534c7ca5"><div class="ttname"><a href="namespacespdlog_1_1level.html#a35f5227e5daf228d28a207b7b2aefc8baea632f71a316dac4dbaf2d98534c7ca5">spdlog::level::debug</a></div><div class="ttdef"><b>Definition:</b> <a href="common_8h_source.html#l00114">common.h:114</a></div></div>
<div class="ttc" id="aclassspdlog_1_1sinks_1_1android__sink_html_ab91c7aabd013d009ff811e6d34324128"><div class="ttname"><a href="classspdlog_1_1sinks_1_1android__sink.html#ab91c7aabd013d009ff811e6d34324128">spdlog::sinks::android_sink::sink_it_</a></div><div class="ttdeci">void sink_it_(const details::log_msg &amp;msg) override</div><div class="ttdef"><b>Definition:</b> <a href="android__sink_8h_source.html#l00044">android_sink.h:44</a></div></div>
<div class="ttc" id="aclassfmt_1_1v5_1_1internal_1_1basic__buffer_html_a384f1304da6ce18c4713368327354479"><div class="ttname"><a href="classfmt_1_1v5_1_1internal_1_1basic__buffer.html#a384f1304da6ce18c4713368327354479">fmt::v5::internal::basic_buffer::data</a></div><div class="ttdeci">T * data()</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00256">core.h:256</a></div></div>
<div class="ttc" id="aclassspdlog_1_1sinks_1_1android__sink_html"><div class="ttname"><a href="classspdlog_1_1sinks_1_1android__sink.html">spdlog::sinks::android_sink</a></div><div class="ttdef"><b>Definition:</b> <a href="android__sink_8h_source.html#l00034">android_sink.h:34</a></div></div>
<div class="ttc" id="aclassfmt_1_1v5_1_1internal_1_1basic__buffer_html_a8e3b65c01dadb977b9c2327864db9e15"><div class="ttname"><a href="classfmt_1_1v5_1_1internal_1_1basic__buffer.html#a8e3b65c01dadb977b9c2327864db9e15">fmt::v5::internal::basic_buffer::push_back</a></div><div class="ttdeci">void push_back(const T &amp;value)</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00278">core.h:278</a></div></div>
<div class="ttc" id="anull__mutex_8h_html"><div class="ttname"><a href="null__mutex_8h.html">null_mutex.h</a></div></div>
<div class="ttc" id="afmt__helper_8h_html"><div class="ttname"><a href="fmt__helper_8h.html">fmt_helper.h</a></div></div>
<div class="ttc" id="anamespacespdlog_html"><div class="ttname"><a href="namespacespdlog.html">spdlog</a></div><div class="ttdef"><b>Definition:</b> <a href="async_8h_source.html#l00027">async.h:27</a></div></div>
<div class="ttc" id="aandroid__sink_8h_html_a8e65ae8a75f7a37ede8942a4311cee5e"><div class="ttname"><a href="android__sink_8h.html#a8e65ae8a75f7a37ede8942a4311cee5e">SPDLOG_ANDROID_RETRIES</a></div><div class="ttdeci">#define SPDLOG_ANDROID_RETRIES</div><div class="ttdef"><b>Definition:</b> <a href="android__sink_8h_source.html#l00024">android_sink.h:24</a></div></div>
<div class="ttc" id="anamespacespdlog_1_1level_html_a35f5227e5daf228d28a207b7b2aefc8ba309b214a2b8629b6cf0048ce916e8a58"><div class="ttname"><a href="namespacespdlog_1_1level.html#a35f5227e5daf228d28a207b7b2aefc8ba309b214a2b8629b6cf0048ce916e8a58">spdlog::level::critical</a></div><div class="ttdef"><b>Definition:</b> <a href="common_8h_source.html#l00118">common.h:118</a></div></div>
<div class="ttc" id="aclassspdlog_1_1sinks_1_1base__sink_html"><div class="ttname"><a href="classspdlog_1_1sinks_1_1base__sink.html">spdlog::sinks::base_sink</a></div><div class="ttdef"><b>Definition:</b> <a href="base__sink_8h_source.html#l00022">base_sink.h:22</a></div></div>
<div class="ttc" id="aspdlog_8h_html"><div class="ttname"><a href="spdlog_8h.html">spdlog.h</a></div></div>
<div class="ttc" id="astructspdlog_1_1details_1_1log__msg_html_a33fd07702d73245581fccd8d0d04b82a"><div class="ttname"><a href="structspdlog_1_1details_1_1log__msg.html#a33fd07702d73245581fccd8d0d04b82a">spdlog::details::log_msg::payload</a></div><div class="ttdeci">const string_view_t payload</div><div class="ttdef"><b>Definition:</b> <a href="log__msg_8h_source.html#l00052">log_msg.h:52</a></div></div>
<div class="ttc" id="anamespacespdlog_1_1level_html_a35f5227e5daf228d28a207b7b2aefc8badd5891a1416461ee9e7d7e19d41af51f"><div class="ttname"><a href="namespacespdlog_1_1level.html#a35f5227e5daf228d28a207b7b2aefc8badd5891a1416461ee9e7d7e19d41af51f">spdlog::level::trace</a></div><div class="ttdef"><b>Definition:</b> <a href="common_8h_source.html#l00113">common.h:113</a></div></div>
<div class="ttc" id="astructspdlog_1_1details_1_1log__msg_html_a4142f4d66140a1ea24053311ebea5706"><div class="ttname"><a href="structspdlog_1_1details_1_1log__msg.html#a4142f4d66140a1ea24053311ebea5706">spdlog::details::log_msg::level</a></div><div class="ttdeci">level::level_enum level</div><div class="ttdef"><b>Definition:</b> <a href="log__msg_8h_source.html#l00042">log_msg.h:42</a></div></div>
<div class="ttc" id="aclassspdlog_1_1spdlog__ex_html"><div class="ttname"><a href="classspdlog_1_1spdlog__ex.html">spdlog::spdlog_ex</a></div><div class="ttdef"><b>Definition:</b> <a href="common_8h_source.html#l00175">common.h:175</a></div></div>
<div class="ttc" id="aclassspdlog_1_1sinks_1_1android__sink_html_ac71785899fb01c7b0328b66b3727e2c3"><div class="ttname"><a href="classspdlog_1_1sinks_1_1android__sink.html#ac71785899fb01c7b0328b66b3727e2c3">spdlog::sinks::android_sink::flush_</a></div><div class="ttdeci">void flush_() override</div><div class="ttdef"><b>Definition:</b> <a href="android__sink_8h_source.html#l00075">android_sink.h:75</a></div></div>
<div class="ttc" id="anamespacespdlog_1_1level_html_a35f5227e5daf228d28a207b7b2aefc8ba6c371ca09668dd308a1997eab47def05"><div class="ttname"><a href="namespacespdlog_1_1level.html#a35f5227e5daf228d28a207b7b2aefc8ba6c371ca09668dd308a1997eab47def05">spdlog::level::warn</a></div><div class="ttdef"><b>Definition:</b> <a href="common_8h_source.html#l00116">common.h:116</a></div></div>
<div class="ttc" id="aclassspdlog_1_1sinks_1_1android__sink_html_afc2727bf62737809cd3f2105e5637540"><div class="ttname"><a href="classspdlog_1_1sinks_1_1android__sink.html#afc2727bf62737809cd3f2105e5637540">spdlog::sinks::android_sink::android_sink</a></div><div class="ttdeci">android_sink(std::string tag=&quot;spdlog&quot;, bool use_raw_msg=false)</div><div class="ttdef"><b>Definition:</b> <a href="android__sink_8h_source.html#l00037">android_sink.h:37</a></div></div>
<div class="ttc" id="anamespacespdlog_html_aab5b508d51de238919a570cf3ca6d3db"><div class="ttname"><a href="namespacespdlog.html#aab5b508d51de238919a570cf3ca6d3db">spdlog::android_logger_st</a></div><div class="ttdeci">std::shared_ptr&lt; logger &gt; android_logger_st(const std::string &amp;logger_name, const std::string &amp;tag=&quot;spdlog&quot;)</div><div class="ttdef"><b>Definition:</b> <a href="android__sink_8h_source.html#l00116">android_sink.h:116</a></div></div>
<div class="ttc" id="anamespacespdlog_html_a0811adb1075181f73abc87c624fbff7e"><div class="ttname"><a href="namespacespdlog.html#a0811adb1075181f73abc87c624fbff7e">spdlog::android_logger_mt</a></div><div class="ttdeci">std::shared_ptr&lt; logger &gt; android_logger_mt(const std::string &amp;logger_name, const std::string &amp;tag=&quot;spdlog&quot;)</div><div class="ttdef"><b>Definition:</b> <a href="android__sink_8h_source.html#l00110">android_sink.h:110</a></div></div>
<div class="ttc" id="astructspdlog_1_1details_1_1log__msg_html"><div class="ttname"><a href="structspdlog_1_1details_1_1log__msg.html">spdlog::details::log_msg</a></div><div class="ttdef"><b>Definition:</b> <a href="log__msg_8h_source.html#l00016">log_msg.h:16</a></div></div>
<div class="ttc" id="anamespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div><div class="ttdef"><b>Definition:</b> <a href="format_8h_source.html#l00297">format.h:297</a></div></div>
<div class="ttc" id="anamespacespdlog_1_1level_html_a35f5227e5daf228d28a207b7b2aefc8ba4d723e295b98a75c1263d85fc165045f"><div class="ttname"><a href="namespacespdlog_1_1level.html#a35f5227e5daf228d28a207b7b2aefc8ba4d723e295b98a75c1263d85fc165045f">spdlog::level::err</a></div><div class="ttdef"><b>Definition:</b> <a href="common_8h_source.html#l00117">common.h:117</a></div></div>
<div class="ttc" id="aclassspdlog_1_1sinks_1_1sink_html_ae59ca2b418c5cdfed1c04e49a444be1c"><div class="ttname"><a href="classspdlog_1_1sinks_1_1sink.html#ae59ca2b418c5cdfed1c04e49a444be1c">spdlog::sinks::sink::level</a></div><div class="ttdeci">level::level_enum level() const</div><div class="ttdef"><b>Definition:</b> <a href="sink_8h_source.html#l00040">sink.h:40</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_5f1136fe404e0a548faf586fae339a6a.html">sdk_core</a></li><li class="navelem"><a class="el" href="dir_fef6b6f1028f30fedf17225feaaa02fe.html">include</a></li><li class="navelem"><a class="el" href="dir_7bb3e31efd6b819bbb0704cee4a66d41.html">third_party</a></li><li class="navelem"><a class="el" href="dir_cf58c3a45797022668a1e269b5315a33.html">spdlog</a></li><li class="navelem"><a class="el" href="dir_248a80cf6760c7a1ab13394a1c16f7b2.html">spdlog</a></li><li class="navelem"><a class="el" href="dir_92a4bcc0ca1142b221c58a95a60bf3b6.html">sinks</a></li><li class="navelem"><a class="el" href="android__sink_8h.html">android_sink.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.16 </li>
  </ul>
</div>
</body>
</html>
